package Chatnetwork1;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.Socket;

public class ChatClient {
    public static void main(String[] args) throws IOException {
        System.out.println("------客户端--------");
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        System.out.println("请输入你的昵称");
        String name = br.readLine();
//        Socket client = new Socket("localhost", 8889);
        Socket client = new Socket("192.168.7.35", 8888);
        //客户端发消息
        new Thread(new Send(client, name)).start();
        //客户端收消息
        new Thread(new Receive(client)).start();
    }
}
